package com.itheima.多态.多态的弊端_05;

//动物类  -- 父类
public abstract class Animal {
    public abstract void eat();
}

class Dog extends Animal{
    @Override
    public void eat() {
        System.out.println("狗吃肉!");
    }

    public void lookHome(){
        System.out.println("狗狗会看家");
    }
}


class Cat extends Animal{
    @Override
    public void eat() {
        System.out.println("猫吃鱼!");
    }
}